package com.usian.user.feign;

import com.usian.model.article.pojos.ApAuthor;
import com.usian.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "leadnews-article")
@RequestMapping("/api/v1/author")
public interface ApAuthorFeign {

    @PostMapping("save")
    public ResponseResult saveApAuthor(@RequestBody ApAuthor apAuthor);

    @GetMapping("findByUserId/{id}")
    public ApAuthor findByUserId(@PathVariable("id") Integer userId);

    @GetMapping("findById/{id}")
    public ApAuthor findById(@PathVariable Integer id);
}
